﻿using System;
using System.Collections.Generic;
using System.Text;
using Cashier_Utils;

namespace Cashier_Model
{
    [Table(Tablename = "bill_shipment")]
    public class BillShipment: BaseModel
    {
        private Int64 id;

        [Table(Columnname="id", Columntype="bigint", Iskey=true, Iscondition=true, Isdeletefield=true)]
        public Int64 Id
        {
            get { return id; }
            set { id = value; }
        }

        private String enterpriseNo;

        [Table(Columnname="enterprise_no", Columntype="varchar", Iscondition=true, Isdeletefield=true)]
        public String EnterpriseNo
        {
            get { return enterpriseNo; }
            set { enterpriseNo = value; }
        }

        private String storeNo;

        [Table(Columnname="store_no", Columntype="varchar", Iscondition=true)]
        public String StoreNo
        {
            get { return storeNo; }
            set { storeNo = value; }
        }

        private String shipmentno;

        [Table(Columnname = "shipment_no", Columntype="varchar", Iscondition=true, Isdeletefield=true)]
        public String Shipmentno
        {
            get { return shipmentno; }
            set { shipmentno = value; }
        }

        private String memberno;

        [Table(Columnname = "member_no", Columntype="varchar", Iscondition=true)]
        public String Memberno
        {
            get { return memberno; }
            set { memberno = value; }
        }

        private Int32 numbers;

        [Table(Columnname = "numbers", Columntype="int", Isupdatefield=true)]
        public Int32 Numbers
        {
            get { return numbers; }
            set { numbers = value; }
        }

        private Decimal goodsTotal;

        [Table(Columnname = "goods_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal GoodsTotal
        {
            get { return goodsTotal; }
            set { goodsTotal = value; }
        }

        private String discountType;

        [Table(Columnname = "discount_type", Columntype="varchar", Isupdatefield=true)]
        public String DiscountType
        {
            get { return discountType; }
            set { discountType = value; }
        }

        private Decimal discountAmount;

        [Table(Columnname = "discount_amount", Columntype = "decimal", Isupdatefield = true)]
        public Decimal DiscountAmount
        {
            get { return discountAmount; }
            set { discountAmount = value; }
        }

        private Decimal discountTotal;

        [Table(Columnname = "discount_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal DiscountTotal
        {
            get { return discountTotal; }
            set { discountTotal = value; }
        }

        private Decimal shipmentTotal;

        [Table(Columnname = "shipment_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal ShipmentTotal
        {
            get { return shipmentTotal; }
            set { shipmentTotal = value; }
        }

        private Decimal memberBalance;

        [Table(Columnname="member_balance", Columntype="decimal", Isupdatefield=true)]
        public Decimal MemberBalance
        {
            get { return memberBalance; }
            set { memberBalance = value; }
        }

        private Decimal integralAmount;

        [Table(Columnname = "integral_amount", Columntype="decimal", Isupdatefield=true)]
        public Decimal IntegralAmount
        {
            get { return integralAmount; }
            set { integralAmount = value; }
        }

        private Int32 payIntegral;

        [Table(Columnname = "pay_integral", Columntype="int", Isupdatefield=true)]
        public Int32 PayIntegral
        {
            get { return payIntegral; }
            set { payIntegral = value; }
        }

        private Decimal payableAmount;

        [Table(Columnname="payable_amount", Columntype="decimal", Isupdatefield=true)]
        public Decimal PayableAmount
        {
            get { return payableAmount; }
            set { payableAmount = value; }
        }

        private Int32 payway;

        [Table(Columnname="payway", Columntype="int", Iscondition=true, Isupdatefield=true)]
        public Int32 Payway
        {
            get { return payway; }
            set { payway = value; }
        }

        private Decimal payAmount;

        [Table(Columnname = "pay_amount", Columntype = "decimal", Isupdatefield = true)]
        public Decimal PayAmount
        {
            get { return payAmount; }
            set { payAmount = value; }
        }

        private Decimal giveAmount;

        [Table(Columnname = "give_amount", Columntype = "decimal", Isupdatefield = true)]
        public Decimal GiveAmount
        {
            get { return giveAmount; }
            set { giveAmount = value; }
        }

        private Decimal debtAmount;

        [Table(Columnname = "debt_amount", Columntype = "decimal", Iscondition=true, Conditiontype=ConditionType.GREATER, Isupdatefield = true)]
        public Decimal DebtAmount
        {
            get { return debtAmount; }
            set { debtAmount = value; }
        }

        private DateTime shipmentDate;

        [Table(Columnname = "shipment_date", Columntype="datetime")]
        public DateTime ShipmentDate
        {
            get { return shipmentDate; }
            set { shipmentDate = value; }
        }

        private String note;

        [Table(Columnname="note", Columntype="varchar", Isupdatefield=true)]
        public String Note
        {
            get { return note; }
            set { note = value; }
        }

        private String adminUsername;

        [Table(Columnname="admin_username", Columntype="varchar", Iscondition=true)]
        public String AdminUsername
        {
            get { return adminUsername; }
            set { adminUsername = value; }
        }

        private String adminName;

        [Table(Columnname="admin_name", Columntype="varchar", Iscondition=true)]
        public String AdminName
        {
            get { return adminName; }
            set { adminName = value; }
        }
        
        private DateTime createtime;

        [Table(Columnname = "createtime", Columntype = "datetime")]
        public DateTime Createtime
        {
            get { return createtime; }
            set { createtime = value; }
        }

        private String startDate;

        public String StartDate
        {
            get { return startDate; }
            set { startDate = value; }
        }

        private String endDate;

        public String EndDate
        {
            get { return endDate; }
            set { endDate = value; }
        }
    }
}
